from typing import Generic, TypeVar

import msgspec

T = TypeVar("T")


class JsonResponse(msgspec.Struct, Generic[T]):
    msg: str | None
    code: int
    data: T | None
